package com.he.DesignPatterns.decorator.demo1;

/**
 * @description: 鸡蛋类 具体装饰
 * @Author: HCL
 * @Date: 2024/8/27 11:21
 */
public class Egg extends Garnish{

    public Egg(FastFood fastFood){
        super(fastFood,1d,"鸡蛋");
    }
    @Override
    public double cost() {
        return getPrice() + getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
